{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 1a. Calculate Pvsat for a single melt composition from a dataframe using default options" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Python set-up\n", "You need to install VolFe once on your machine, if you haven't yet. Then we need to import a few Python packages (including VolFe). " ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Install VolFe on your machine.\n", "# pip install VolFe # Remove the first # in this line if you have not installed VolFe on your machine before.\n", "\n", "# import python packages\n", "import pandas as pd\n", "import VolFe as vf" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Define the inputs\n", "\n", "At a minimum to run a Pvsat calculations, we need a dataframe of the melt composition, an estimate of oxygen fugacity and Fe in the melt [note 1], and temperature:\n", "\n", "- Sample is just the name for this analysis.\n", "\n", "- Temperature is in °C.\n", "\n", "- Volatile-free melt composition is in wt% oxides [note 2]. All these oxides must be present in the dataframe, so set them to 0. if you have no data for them (although see [note 1] around FeOT).\n", "\n", "- H2O is all hydrogen in the melt reported as H2O in wt% [note 3]. \n", "\n", "- CO2ppm is all carbon in the melt reported as CO2 in ppm [note 3].\n", "\n", "- STppm is all sulfur in the melt reported as S in ppm [note 3].\n", "\n", "- Xppm is all \"X\" in the melt reported as \"X\" in ppm [note 3]. \"X\" is an unreactive melt species whose identity can be changed - this is explored in Example 1d.\n", "\n", "- Fe3+FeT is the ratio of Fe3+ to FeT in the melt.\n", "\n", "[note 1] In this example we specify oxygen fugacity using Fe3+/FeT and Fe in the melt as FeOT as is quite common for melt inclusion and matrix glass analyses - other options are possible, shown later in the notebook.\n", "\n", "[note 2] It does not matter what the non-volatile oxides sum too - they are renormalised to 100 wt% minus the total of the volatiles (i.e., H2O + CO2 + ST + X).\n", "\n", "[note 3] The volatile concentrations are absolute for the melt = i.e., the non-volatile melt composition is normalised to 100 wt% minus the volatiles. The volatiles are not added to the oxides and then renormalised.\n", "\n", "The following composition is analysis TN273-01D-01-01 from Brounce et al. (2014) with the updated Fe3+/FeT from Cottrell et al. (2021), with a temperature chosen as 1200 °C." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " Sample T_C SiO2 TiO2 Al2O3 FeOT MnO MgO CaO Na2O \\\n", "0 TN273-01D-01-01 1200.0 56.98 1.66 15.52 9.47 0.24 2.96 6.49 4.06 \n", "\n", " K2O P2O5 H2O CO2ppm STppm Fe3FeT \n", "0 0.38 0.22 1.88 13.0 362.83 0.155 \n" ] } ], "source": [ "# Define the melt composition, fO2 estimate, and T as a dictionary.\n", "my_analysis = {'Sample':'TN273-01D-01-01',\n", " 'T_C': 1200., # Temperature in 'C\n", " 'SiO2': 56.98, # wt%\n", " 'TiO2': 1.66, # wt%\n", " 'Al2O3': 15.52, # wt%\n", " 'FeOT': 9.47, # wt%\n", " 'MnO': 0.24, # wt%\n", " 'MgO': 2.96, # wt%\n", " 'CaO': 6.49, # wt%\n", " 'Na2O': 4.06, # wt%\n", " 'K2O': 0.38, # wt%\n", " 'P2O5': 0.22, # wt%\n", " 'H2O': 1.88, # wt%\n", " 'CO2ppm': 13., # ppm\n", " 'STppm': 362.83, # ppm\n", " 'Fe3FeT': 0.155} # mole or weight fraction (they're the same)\n", "\n", "# Turn the dictionary into a pandas dataframe, setting the index to 0.\n", "my_analysis = pd.DataFrame(my_analysis, index=[0])\n", "\n", "# Show the DataFrame.\n", "print(my_analysis)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For this example we will use the default options in VolFe, which can be found below:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ " option\n", "type \n", "COH_species yes_H2_CO_CH4_melt\n", "H2S_m True\n", "species X Ar\n", "Hspeciation none\n", "fO2 Kress91A\n", "... ...\n", "error 0.1\n", "print status False\n", "output csv True\n", "setup False\n", "high precision False\n", "\n", "[78 rows x 1 columns]\n" ] } ], "source": [ "# print default options in VolFe\n", "print(vf.default_models)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Run the calculation\n", "\n", "### Define fO2 using Fe3+/FeT\n", "\n", "And below runs the calculation - it outputs a dataframe of the full results." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
sampleT_CP_barSiO2_wtpcTiO2_wtpcAl2O3_wtpcFeOT_wtpcMnO_wtpcMgO_wtpcCaO_wtpc...KHOSg optKOSg optKOSg2 optKCOg optKCOHg optKOCSg optKCOs optcarbonylsulfide optdensity optDate
0TN273-01D-01-011200.0328.12860157.039561.66173515.5362239.4798990.2402512.9630946.496784...Ohmoto97Ohmoto97ONeill22Ohmoto97Ohmoto97Moussallam19Holloway92COSDensityX2025-03-07 16:37:48.271042
\n", "

1 rows × 173 columns

\n", "
" ], "text/plain": [ "0 sample T_C P_bar SiO2_wtpc TiO2_wtpc Al2O3_wtpc \\\n", "0 TN273-01D-01-01 1200.0 328.128601 57.03956 1.661735 15.536223 \n", "\n", "0 FeOT_wtpc MnO_wtpc MgO_wtpc CaO_wtpc ... KHOSg opt KOSg opt KOSg2 opt \\\n", "0 9.479899 0.240251 2.963094 6.496784 ... Ohmoto97 Ohmoto97 ONeill22 \n", "\n", "0 KCOg opt KCOHg opt KOCSg opt KCOs opt carbonylsulfide opt \\\n", "0 Ohmoto97 Ohmoto97 Moussallam19 Holloway92 COS \n", "\n", "0 density opt Date \n", "0 DensityX 2025-03-07 16:37:48.271042 \n", "\n", "[1 rows x 173 columns]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# runs the calculation\n", "vf.calc_Pvsat(my_analysis)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Define fO2 using ΔFMQ\n", "\n", "Alternatively, we can define the oxygen fugacity using ΔFMQ and total iron from Fe2O3,T ..." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
sampleT_CP_barSiO2_wtpcTiO2_wtpcAl2O3_wtpcFeOT_wtpcMnO_wtpcMgO_wtpcCaO_wtpc...KHOSg optKOSg optKOSg2 optKCOg optKCOHg optKOCSg optKCOs optcarbonylsulfide optdensity optDate
0TN273-01D-01-011200.0322.47109857.5973081.67798415.688148.613520.24262.9920686.560311...Ohmoto97Ohmoto97ONeill22Ohmoto97Ohmoto97Moussallam19Holloway92COSDensityX2025-02-18 13:16:18.593337
\n", "

1 rows × 173 columns

\n", "
" ], "text/plain": [ "0 sample T_C P_bar SiO2_wtpc TiO2_wtpc Al2O3_wtpc \\\n", "0 TN273-01D-01-01 1200.0 322.471098 57.597308 1.677984 15.68814 \n", "\n", "0 FeOT_wtpc MnO_wtpc MgO_wtpc CaO_wtpc ... KHOSg opt KOSg opt KOSg2 opt \\\n", "0 8.61352 0.2426 2.992068 6.560311 ... Ohmoto97 Ohmoto97 ONeill22 \n", "\n", "0 KCOg opt KCOHg opt KOCSg opt KCOs opt carbonylsulfide opt \\\n", "0 Ohmoto97 Ohmoto97 Moussallam19 Holloway92 COS \n", "\n", "0 density opt Date \n", "0 DensityX 2025-02-18 13:16:18.593337 \n", "\n", "[1 rows x 173 columns]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Define the melt composition, fO2 estimate, and T as a dictionary.\n", "my_analysis = {'Sample':'TN273-01D-01-01',\n", " 'T_C': 1200.,\n", " 'SiO2': 56.98,\n", " 'TiO2': 1.66,\n", " 'Al2O3': 15.52,\n", " 'Fe2O3T': 9.47, # <-- Fe2O3T instead of FeOT\n", " 'MnO': 0.24,\n", " 'MgO': 2.96,\n", " 'CaO': 6.49,\n", " 'Na2O': 4.06,\n", " 'K2O': 0.38,\n", " 'P2O5': 0.22,\n", " 'H2O': 1.88,\n", " 'CO2ppm': 13.,\n", " 'STppm': 362.83,\n", " 'DFMQ': 0.} # <-- DFMQ instead of Fe3+/FeT\n", "\n", "# Turn the dictionary into a pandas dataframe, setting the index to 0.\n", "my_analysis = pd.DataFrame(my_analysis, index=[0])\n", "\n", "# runs the calculation\n", "vf.calc_Pvsat(my_analysis)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Define fO2 using FeO and Fe2O3\n", "\n", "... or FeO and Fe2O3 ..." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
sampleT_CP_barSiO2_wtpcTiO2_wtpcAl2O3_wtpcFeOT_wtpcMnO_wtpcMgO_wtpcCaO_wtpc...KHOSg optKOSg optKOSg2 optKCOg optKCOHg optKOCSg optKCOs optcarbonylsulfide optdensity optDate
0TN273-01D-01-011200.0401.47472252.2885921.52332514.24217216.8598250.220242.7162915.95565...Ohmoto97Ohmoto97ONeill22Ohmoto97Ohmoto97Moussallam19Holloway92COSDensityX2025-02-18 13:16:19.183230
\n", "

1 rows × 173 columns

\n", "
" ], "text/plain": [ "0 sample T_C P_bar SiO2_wtpc TiO2_wtpc Al2O3_wtpc \\\n", "0 TN273-01D-01-01 1200.0 401.474722 52.288592 1.523325 14.242172 \n", "\n", "0 FeOT_wtpc MnO_wtpc MgO_wtpc CaO_wtpc ... KHOSg opt KOSg opt KOSg2 opt \\\n", "0 16.859825 0.22024 2.716291 5.95565 ... Ohmoto97 Ohmoto97 ONeill22 \n", "\n", "0 KCOg opt KCOHg opt KOCSg opt KCOs opt carbonylsulfide opt \\\n", "0 Ohmoto97 Ohmoto97 Moussallam19 Holloway92 COS \n", "\n", "0 density opt Date \n", "0 DensityX 2025-02-18 13:16:19.183230 \n", "\n", "[1 rows x 173 columns]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Define the melt composition, fO2 estimate, and T as a dictionary.\n", "my_analysis = {'Sample':'TN273-01D-01-01',\n", " 'T_C': 1200.,\n", " 'SiO2': 56.98,\n", " 'TiO2': 1.66,\n", " 'Al2O3': 15.52,\n", " 'FeO': 8.03, # <-- FeO and Fe2O3 to contraint total Fe and fO2\n", " 'Fe2O3': 2.57, # <-- ^\n", " 'MnO': 0.24,\n", " 'MgO': 2.96,\n", " 'CaO': 6.49,\n", " 'Na2O': 4.06,\n", " 'K2O': 0.38,\n", " 'P2O5': 0.22,\n", " 'H2O': 1.88,\n", " 'CO2ppm': 13.,\n", " 'STppm': 362.83} \n", "\n", "# Turn the dictionary into a pandas dataframe, setting the index to 0.\n", "my_analysis = pd.DataFrame(my_analysis, index=[0])\n", "\n", "# runs the calculation\n", "vf.calc_Pvsat(my_analysis)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Define fO2 using ΔNNO\n", "\n", "... ΔNNO and FeOT ..." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
sampleT_CP_barSiO2_wtpcTiO2_wtpcAl2O3_wtpcFeOT_wtpcMnO_wtpcMgO_wtpcCaO_wtpc...KHOSg optKOSg optKOSg2 optKCOg optKCOHg optKOCSg optKCOs optcarbonylsulfide optdensity optDate
0TN273-01D-01-011200.0437.86882757.039561.66173515.5362239.4798990.2402512.9630946.496784...Ohmoto97Ohmoto97ONeill22Ohmoto97Ohmoto97Moussallam19Holloway92COSDensityX2025-02-18 13:16:19.868705
\n", "

1 rows × 173 columns

\n", "
" ], "text/plain": [ "0 sample T_C P_bar SiO2_wtpc TiO2_wtpc Al2O3_wtpc \\\n", "0 TN273-01D-01-01 1200.0 437.868827 57.03956 1.661735 15.536223 \n", "\n", "0 FeOT_wtpc MnO_wtpc MgO_wtpc CaO_wtpc ... KHOSg opt KOSg opt KOSg2 opt \\\n", "0 9.479899 0.240251 2.963094 6.496784 ... Ohmoto97 Ohmoto97 ONeill22 \n", "\n", "0 KCOg opt KCOHg opt KOCSg opt KCOs opt carbonylsulfide opt \\\n", "0 Ohmoto97 Ohmoto97 Moussallam19 Holloway92 COS \n", "\n", "0 density opt Date \n", "0 DensityX 2025-02-18 13:16:19.868705 \n", "\n", "[1 rows x 173 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Define the melt composition, fO2 estimate, and T as a dictionary.\n", "my_analysis = {'Sample':'TN273-01D-01-01',\n", " 'T_C': 1200.,\n", " 'SiO2': 56.98,\n", " 'TiO2': 1.66,\n", " 'Al2O3': 15.52,\n", " 'FeOT': 9.47, # <--\n", " 'MnO': 0.24,\n", " 'MgO': 2.96,\n", " 'CaO': 6.49,\n", " 'Na2O': 4.06,\n", " 'K2O': 0.38,\n", " 'P2O5': 0.22,\n", " 'H2O': 1.88,\n", " 'CO2ppm': 13.,\n", " 'STppm': 362.83,\n", " 'DNNO': 1.} # <--\n", "\n", "# Turn the dictionary into a pandas dataframe, setting the index to 0.\n", "my_analysis = pd.DataFrame(my_analysis, index=[0])\n", "\n", "# runs the calculation\n", "vf.calc_Pvsat(my_analysis)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Define fO2 using S6+/ST\n", "\n", "... or S6+/ST and FeOT ..." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
sampleT_CP_barSiO2_wtpcTiO2_wtpcAl2O3_wtpcFeOT_wtpcMnO_wtpcMgO_wtpcCaO_wtpc...KHOSg optKOSg optKOSg2 optKCOg optKCOHg optKOCSg optKCOs optcarbonylsulfide optdensity optDate
0TN273-01D-01-011200.0390.06717257.039561.66173515.5362239.4798990.2402512.9630946.496784...Ohmoto97Ohmoto97ONeill22Ohmoto97Ohmoto97Moussallam19Holloway92COSDensityX2025-02-18 13:16:21.882443
\n", "

1 rows × 173 columns

\n", "
" ], "text/plain": [ "0 sample T_C P_bar SiO2_wtpc TiO2_wtpc Al2O3_wtpc \\\n", "0 TN273-01D-01-01 1200.0 390.067172 57.03956 1.661735 15.536223 \n", "\n", "0 FeOT_wtpc MnO_wtpc MgO_wtpc CaO_wtpc ... KHOSg opt KOSg opt KOSg2 opt \\\n", "0 9.479899 0.240251 2.963094 6.496784 ... Ohmoto97 Ohmoto97 ONeill22 \n", "\n", "0 KCOg opt KCOHg opt KOCSg opt KCOs opt carbonylsulfide opt \\\n", "0 Ohmoto97 Ohmoto97 Moussallam19 Holloway92 COS \n", "\n", "0 density opt Date \n", "0 DensityX 2025-02-18 13:16:21.882443 \n", "\n", "[1 rows x 173 columns]" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Define the melt composition, fO2 estimate, and T as a dictionary.\n", "my_analysis = {'Sample':'TN273-01D-01-01',\n", " 'T_C': 1200.,\n", " 'SiO2': 56.98,\n", " 'TiO2': 1.66,\n", " 'Al2O3': 15.52,\n", " 'FeOT': 9.47, # <--\n", " 'MnO': 0.24,\n", " 'MgO': 2.96,\n", " 'CaO': 6.49,\n", " 'Na2O': 4.06,\n", " 'K2O': 0.38,\n", " 'P2O5': 0.22,\n", " 'H2O': 1.88,\n", " 'CO2ppm': 13.,\n", " 'STppm': 362.83,\n", " 'S6ST': 0.23} # <--\n", "\n", "# Turn the dictionary into a pandas dataframe, setting the index to 0.\n", "my_analysis = pd.DataFrame(my_analysis, index=[0])\n", "\n", "# runs the calculation\n", "vf.calc_Pvsat(my_analysis)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Potential error: defining fO2 in too many ways\n", "\n", "If we try to specify too many variables to constrain total Fe and fO2, we'll get a warning from VolFe telling you it is only using one of the options to calculate things." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "C:\\Users\\ehughes\\projects\\VolFe\\src\\VolFe\\melt_gas.py:1782: UserWarning: you entered more than one way to infer iron speciation, note that this calcualtion is only considering the entered Fe3+/FeT\n", " w.warn('you entered more than one way to infer iron speciation, note that this calcualtion is only considering the entered Fe3+/FeT')\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
sampleT_CP_barSiO2_wtpcTiO2_wtpcAl2O3_wtpcFeOT_wtpcMnO_wtpcMgO_wtpcCaO_wtpc...KHOSg optKOSg optKOSg2 optKCOg optKCOHg optKOCSg optKCOs optcarbonylsulfide optdensity optDate
0TN273-01D-01-011200.0327.8971357.039561.66173515.5362239.4798990.2402512.9630946.496784...Ohmoto97Ohmoto97ONeill22Ohmoto97Ohmoto97Moussallam19Holloway92COSDensityX2025-02-18 13:16:22.574874
\n", "

1 rows × 173 columns

\n", "
" ], "text/plain": [ "0 sample T_C P_bar SiO2_wtpc TiO2_wtpc Al2O3_wtpc \\\n", "0 TN273-01D-01-01 1200.0 327.89713 57.03956 1.661735 15.536223 \n", "\n", "0 FeOT_wtpc MnO_wtpc MgO_wtpc CaO_wtpc ... KHOSg opt KOSg opt KOSg2 opt \\\n", "0 9.479899 0.240251 2.963094 6.496784 ... Ohmoto97 Ohmoto97 ONeill22 \n", "\n", "0 KCOg opt KCOHg opt KOCSg opt KCOs opt carbonylsulfide opt \\\n", "0 Ohmoto97 Ohmoto97 Moussallam19 Holloway92 COS \n", "\n", "0 density opt Date \n", "0 DensityX 2025-02-18 13:16:22.574874 \n", "\n", "[1 rows x 173 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Define the melt composition, fO2 estimate, and T as a dictionary.\n", "my_analysis = {'Sample':'TN273-01D-01-01',\n", " 'T_C': 1200.,\n", " 'SiO2': 56.98,\n", " 'TiO2': 1.66,\n", " 'Al2O3': 15.52,\n", " 'FeOT': 9.47, # <--\n", " 'MnO': 0.24,\n", " 'MgO': 2.96,\n", " 'CaO': 6.49,\n", " 'Na2O': 4.06,\n", " 'K2O': 0.38,\n", " 'P2O5': 0.22,\n", " 'H2O': 1.88,\n", " 'CO2ppm': 13.,\n", " 'STppm': 362.83,\n", " 'DNNO': 1., # <--\n", " 'Fe3FeT':0.155} # <--\n", "\n", "# Turn the dictionary into a pandas dataframe, setting the index to 0.\n", "my_analysis = pd.DataFrame(my_analysis, index=[0])\n", "\n", "# runs the calculation\n", "vf.calc_Pvsat(my_analysis)" ] } ], "metadata": { "kernelspec": { "display_name": "volfe-dev", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.0" } }, "nbformat": 4, "nbformat_minor": 2 }